export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/Login',
          },
          {
            name: 'register',
            path: '/user/register',
            component: './user/Register',
          },
          {
            name: 'register',
            path: '/user/registerResult',
            component: './user/RegisterResult',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/SecurityLayout',
        routes: [
          {
            path: '/',
            component: '../layouts/BasicLayout',
            authority: ['admin', 'user'],
            routes: [
              {
                path: '/',
                redirect: '/welcome',
              },
              {
                path: '/welcome',
                name: 'welcome',
                icon: 'smile',
                component: './Welcome',
              },
              {
                path: '/userSetting',
                name: 'userSetting',
                icon: 'crown',
                component: './user/Setting',
                authority: ['admin'],
              },
              {
                path: '/Mycount',
                name: 'Mycount',
                icon: 'AccountBookOutlined',
                component: './Mycount',
                authority: ['admin'],
              },
              // {
              //   path: '/collection',
              //   name: 'collection',
              //   icon: 'crown',
              //   authority: ['admin', 'user'],
              //   routes: [
              //     {
              //       name: 'myCollectionList',
              //       icon: 'table',
              //       path: '/collection/myCollectionList',
              //       component: './collection/MyCollectionList',
              //       authority: ['admin', 'user'],
              //     },
              //     {
              //       path: '/collection/myCollection/:collectionID',
              //       component: './collection/MyCollection',
              //       authority: ['admin', 'user'],
              //     },
              //   ],
              // },
              {
                path: '/item',
                name: 'item',
                icon: 'crown',
                authority: ['admin', 'user'],
                routes: [
                  {
                    name: 'myItemList',
                    icon: 'table',
                    path: '/item/myItemList',
                    component: './item/MyItemList',
                    authority: ['admin', 'user'],
                  },
                  {
                    name: 'addItem',
                    icon: 'table',
                    path: '/item/addItem',
                    component: './item/AddItem',
                    authority: ['admin', 'user'],
                  },
                ],
              },
              {
                path: '/trade',
                name: 'trade',
                icon: 'crown',
                authority: ['admin', 'user'],
                routes: [
                  {
                    name: 'table',
                    icon: 'ShoppingOutlined',
                    path: '/trade/itemTable',
                    component: './trade/ItemTable',
                    authority: ['admin', 'user'],
                  },
                  {
                    path: '/trade/item/:itemID',
                    component: './trade/Item',
                    authority: ['admin', 'user'],
                  },
                  {
                    component: './404',
                  },
                ],
              },
              // {
              //   path: '/verify',
              //   name: 'verify',
              //   icon: 'crown',
              //   component: './verify',
              //   authority: ['admin', 'user'],
              // },
              {
                component: './404',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];
